/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.feiyue.basic.reader.view;

import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.ColorDrawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.PopupWindow;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;

public class FontLightTabMenu extends PopupWindow {
	public static final String RECEIVER = "com.worlds.reader.view.LightTabMenu";
	private Context mContext;
	private int mFontSize;
	private LayoutInflater mInflater;
	private int mLight;
	private SeekBar seekBar;
	private SeekBar seekBar2;
	private View view;

	public FontLightTabMenu(Context paramContext,
			View.OnClickListener paramOnClickListener, int paramInt1,
			int paramInt2, int paramInt3, int paramInt4) {
		super(paramContext);
		this.mContext = paramContext;
		this.mInflater = ((LayoutInflater) paramContext
				.getSystemService("layout_inflater"));
		this.view = this.mInflater.inflate(2130903087, null);
		this.seekBar = ((SeekBar) this.view.findViewById(2131099902));
		this.seekBar2 = ((SeekBar) this.view.findViewById(2131099905));
		this.seekBar.setProgress(paramInt3);
		this.seekBar2.setProgress(paramInt4);
		setContentView(this.view);
		setWidth(-1);
		setHeight(-2);
		setBackgroundDrawable(new ColorDrawable(paramInt1));
		setAnimationStyle(paramInt2);
		setFocusable(true);
		this.seekBar
				.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
					public void onProgressChanged(SeekBar paramSeekBar,
							int paramInt, boolean paramBoolean) {
						Intent localIntent = new Intent("tab_menu");
						localIntent.putExtra("position",
								paramSeekBar.getProgress());
						localIntent.putExtra("type", "font");
						FontLightTabMenu.this.mContext
								.sendBroadcast(localIntent);
					}

					public void onStartTrackingTouch(SeekBar paramSeekBar) {
					}

					public void onStopTrackingTouch(SeekBar paramSeekBar) {
					}
				});
		this.seekBar2
				.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
					public void onProgressChanged(SeekBar paramSeekBar,
							int paramInt, boolean paramBoolean) {
						Intent localIntent = new Intent("tab_menu");
						localIntent.putExtra("type", "light");
						localIntent.putExtra("position", paramInt);
						FontLightTabMenu.this.mContext
								.sendBroadcast(localIntent);
					}

					public void onStartTrackingTouch(SeekBar paramSeekBar) {
					}

					public void onStopTrackingTouch(SeekBar paramSeekBar) {
					}
				});
	}

	public void setFontSize(int paramInt) {
		this.mFontSize = paramInt;
		this.seekBar.setProgress(this.mFontSize);
	}

	public void setLight(int paramInt) {
		this.mLight = paramInt;
		this.seekBar2.setProgress(this.mLight);
	}
}